package com.unionpay.mpds.model;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * System entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_SYSTEM", schema = "MPDS")
public class System implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -7959103122750195139L;
	private String systemDate;
	private String systemStatus;
	private Integer systemBatch;
	private Integer systemTrace;

	// Constructors

	/** default constructor */
	public System() {
	}

	/** full constructor */
	public System(String systemDate, String systemStatus,
			Integer systemBatch, Integer systemTrace) {
		this.systemDate = systemDate;
		this.systemStatus = systemStatus;
		this.systemBatch = systemBatch;
		this.systemTrace = systemTrace;
	}

	// Property accessors

	@Id
	@Column(name = "SYSTEM_DATE", nullable = false, length = 8)
	public String getSystemDate() {
		return this.systemDate;
	}

	public void setSystemDate(String systemDate) {
		this.systemDate = systemDate;
	}

	@Column(name = "SYSTEM_STATUS", nullable = false, length = 1)
	public String getSystemStatus() {
		return this.systemStatus;
	}

	public void setSystemStatus(String systemStatus) {
		this.systemStatus = systemStatus;
	}

	@Column(name = "SYSTEM_BATCH", nullable = false)
	public Integer getSystemBatch() {
		return this.systemBatch;
	}

	public void setSystemBatch(Integer systemBatch) {
		this.systemBatch = systemBatch;
	}

	@Column(name = "SYSTEM_TRACE", nullable = false)
	public Integer getSystemTrace() {
		return this.systemTrace;
	}

	public void setSystemTrace(Integer systemTrace) {
		this.systemTrace = systemTrace;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof System))
			return false;
		System castOther = (System) other;

		return ((this.getSystemDate() == castOther.getSystemDate()) || (this
				.getSystemDate() != null && castOther.getSystemDate() != null && this
				.getSystemDate().equals(castOther.getSystemDate())))
				&& ((this.getSystemStatus() == castOther.getSystemStatus()) || (this
						.getSystemStatus() != null
						&& castOther.getSystemStatus() != null && this
						.getSystemStatus().equals(castOther.getSystemStatus())))
				&& ((this.getSystemBatch() == castOther.getSystemBatch()) || (this
						.getSystemBatch() != null
						&& castOther.getSystemBatch() != null && this
						.getSystemBatch().equals(castOther.getSystemBatch())))
				&& ((this.getSystemTrace() == castOther.getSystemTrace()) || (this
						.getSystemTrace() != null
						&& castOther.getSystemTrace() != null && this
						.getSystemTrace().equals(castOther.getSystemTrace())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getSystemDate() == null ? 0 : this.getSystemDate()
						.hashCode());
		result = 37
				* result
				+ (getSystemStatus() == null ? 0 : this.getSystemStatus()
						.hashCode());
		result = 37
				* result
				+ (getSystemBatch() == null ? 0 : this.getSystemBatch()
						.hashCode());
		result = 37
				* result
				+ (getSystemTrace() == null ? 0 : this.getSystemTrace()
						.hashCode());
		return result;
	}

}